﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="roleManager.aspx.cs" Inherits="WebSite.admin.admin.roleManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
    <title>福利点点通 </title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <script src="../js/common.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">

        function addNewRole() { 
         openNewTab('RoleAdd','/admin/admin/roleAdd.aspx','添加角色')  ;
        }
    </script>

</head>
<body>
    <form id="form2" runat="server">


       <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="角色列表"  ShowHeader="true" >
              <Items>

            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">
             <Items>
      
            <ext:Label ID="lblKeywords"  Width="60px"    runat="server" Text="&nbsp;&nbsp;关键字："></ext:Label>
            <ext:TextBox runat="server" ID="txtKeywords"   MaxLength="100" Label="关键字" ></ext:TextBox>
                   <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server" 
                     OnClick="btnSearch_Click"></ext:Button>


                     <ext:Button id="btnRoleAdd" runat="server" Text="添加新角色" OnClientClick="addNewRole()"></ext:Button>
                  </Items>
         </ext:Panel>

     </Items>
     
   </ext:SimpleForm>



            <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  CssClass="x-form-item"  Height="418px"  AllowPaging="true" SortColumn="RoleName" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="False" runat="server" EnableCheckBoxSelect="false"   AllowSorting="true"    IsDatabasePaging="false" 
                        DataKeyNames="RoleName" OnSort="Grid1_Sort" EnableRowNumber="True">

        <Columns>    
         <ext:BoundField Width="200px" ColumnID="Id" SortField="Id" DataField="Id" DataFormatString="{0}"
                HeaderText="ID" />
                     <ext:BoundField Width="200px" ColumnID="RoleName" SortField="RoleName" DataField="RoleName" DataFormatString="{0}"
                HeaderText="角色名称" />
                                <ext:BoundField Width="200px" ColumnID="Remark" SortField="Remark" DataField="Remark" DataFormatString="{0}"
                HeaderText="角色描述" />

                     <ext:BoundField Width="140px" ColumnID="createTime" SortField="createTime" DataField="createTime" DataFormatString="{0}"
                HeaderText="添加时间" />
      
          <ext:TemplateField Width="140px" SortField="" HeaderText="操作">
                <ItemTemplate>
                      <a href="#" onclick="openNewTab('RoleAdd','/admin/admin/roleAdd.aspx?rid=<%# Eval("Id") %>','角色编辑')",  title="编辑">[编辑]</a>
                      <a title="删除" href="roleManager.aspx?rid=<%# Eval("Id") %>&action=del" onclick="javascript:return confirm('你确定要删除这个管理员吗?');">[删除]</a>
                          <a href="#" onclick="openNewTab('RolePermission','/admin/admin/<%#  "roleRule.aspx?rid=" + Eval("Id")  %>','权限-<%# Eval("RoleName") %>')",  title="权限">[权限]</a>

                    
                </ItemTemplate>
            </ext:TemplateField>
        </Columns>
    </ext:Grid>

    </form>
</body>
</html>
